<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:p="http://primefaces.org/ui">

    <ui:composition>

        <p:dialog id="FlightViewDlg" widgetVar="FlightViewDialog" modal="true" resizable="false" appendToBody="true" header="#{bundle.ViewFlightTitle}" closeOnEscape="true">

            <h:form id="FlightViewForm">

                <h:panelGroup id="display">
                    <p:panelGrid columns="2" rendered="#{flightController.selected != null}">

                        <h:outputText value="#{bundle.ViewFlightLabel_flightId}"/>
                        <h:outputText value="#{flightController.selected.flightId}" title="#{bundle.ViewFlightTitle_flightId}"/>

                        <h:outputText value="#{bundle.ViewFlightLabel_departureDate}"/>
                        <h:outputText value="#{flightController.selected.departureDate}" title="#{bundle.ViewFlightTitle_departureDate}">
                            <f:convertDateTime pattern="MM/dd/yyyy HH:mm:ss" />
                        </h:outputText>

                        <h:outputText value="#{bundle.ViewFlightLabel_arrivalDate}"/>
                        <h:outputText value="#{flightController.selected.arrivalDate}" title="#{bundle.ViewFlightTitle_arrivalDate}">
                            <f:convertDateTime pattern="MM/dd/yyyy HH:mm:ss" />
                        </h:outputText>

                        <h:outputText value="#{bundle.ViewFlightLabel_flightOrigin}"/>
                        <h:outputText value="#{flightController.selected.flightOrigin}" title="#{bundle.ViewFlightTitle_flightOrigin}"/>

                        <h:outputText value="#{bundle.ViewFlightLabel_flightDestination}"/>
                        <h:outputText value="#{flightController.selected.flightDestination}" title="#{bundle.ViewFlightTitle_flightDestination}"/>

                        <h:outputText value="#{bundle.ViewFlightLabel_cabinClass}"/>
                        <h:outputText value="#{flightController.selected.cabinClass}" title="#{bundle.ViewFlightTitle_cabinClass}"/>

                        <h:outputText value="#{bundle.ViewFlightLabel_price}"/>
                        <h:outputText value="#{flightController.selected.price}" title="#{bundle.ViewFlightTitle_price}"/>

                        <h:outputText value="#{bundle.ViewFlightLabel_product}"/>
                        <h:outputText value="#{flightController.selected.product.productId}"/>
                    </p:panelGrid>
                    <p:commandButton value="#{bundle.Close}" onclick="FlightViewDialog.hide()"/>
                </h:panelGroup>

            </h:form>

        </p:dialog>

    </ui:composition>

</html>
